package com.ap.core.validation.service;

import com.ap.core.common.types.ValidationType;
import com.ap.core.validation.info.ValidationResult;

/**
 * User: Ranjit.Singh
 * This business validation service will be used by AP Core to validate incoming messages from OSB.
 */
public interface BusinessValidationService<V> {

	/**
	 * Validates the object using specific set of business rules based on the
	 * validation type
	 * @param object
	 *            the info object on which the rule is applied.
	 * @param validationType
	 *            the validation type.
	 * @return List of error codes against failures
	 */
	ValidationResult validate(V object, ValidationType validationType);
}